import re

def mention(content):
    mention = re.findall('(@[a-zA-Z0-9\_])\s+', content)
    if (len(mention) > 0):
        for m in mention:
            username = re.findall('(@[a-zA-Z0-9\_])', m)
            if (len(username) > 0):
                content = content.replace('@' + username[0],
                                          '@<a href="/user/' + username[0] + '">' + username[0] + '</a>')
        return content
    else:
        return content
